package com.ztorn.fiscale.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ztorn.fiscale.mapper.FiscaleCustomsStatusHistoryMapper;
import com.ztorn.fiscale.domain.FiscaleCustomsStatusHistory;
import com.ztorn.fiscale.service.IFiscaleCustomsStatusHistoryService;

/**
 * 报关单状态历史Service业务层处理
 * 
 * @author ztorn
 * @date 2025-01-19
 */
@Service
public class FiscaleCustomsStatusHistoryServiceImpl implements IFiscaleCustomsStatusHistoryService 
{
    @Autowired
    private FiscaleCustomsStatusHistoryMapper fiscaleCustomsStatusHistoryMapper;

    /**
     * 查询报关单状态历史
     * 
     * @param logId 报关单状态历史主键
     * @return 报关单状态历史
     */
    @Override
    public FiscaleCustomsStatusHistory selectFiscaleCustomsStatusHistoryByLogId(Long logId)
    {
        return fiscaleCustomsStatusHistoryMapper.selectFiscaleCustomsStatusHistoryByLogId(logId);
    }

    /**
     * 查询报关单状态历史列表
     * 
     * @param fiscaleCustomsStatusHistory 报关单状态历史
     * @return 报关单状态历史
     */
    @Override
    public List<FiscaleCustomsStatusHistory> selectFiscaleCustomsStatusHistoryList(FiscaleCustomsStatusHistory fiscaleCustomsStatusHistory)
    {
        return fiscaleCustomsStatusHistoryMapper.selectFiscaleCustomsStatusHistoryList(fiscaleCustomsStatusHistory);
    }

    /**
     * 新增报关单状态历史
     * 
     * @param fiscaleCustomsStatusHistory 报关单状态历史
     * @return 结果
     */
    @Override
    public int insertFiscaleCustomsStatusHistory(FiscaleCustomsStatusHistory fiscaleCustomsStatusHistory)
    {
        return fiscaleCustomsStatusHistoryMapper.insertFiscaleCustomsStatusHistory(fiscaleCustomsStatusHistory);
    }

    /**
     * 修改报关单状态历史
     * 
     * @param fiscaleCustomsStatusHistory 报关单状态历史
     * @return 结果
     */
    @Override
    public int updateFiscaleCustomsStatusHistory(FiscaleCustomsStatusHistory fiscaleCustomsStatusHistory)
    {
        return fiscaleCustomsStatusHistoryMapper.updateFiscaleCustomsStatusHistory(fiscaleCustomsStatusHistory);
    }

    /**
     * 批量删除报关单状态历史
     * 
     * @param logIds 需要删除的报关单状态历史主键
     * @return 结果
     */
    @Override
    public int deleteFiscaleCustomsStatusHistoryByLogIds(Long[] logIds)
    {
        return fiscaleCustomsStatusHistoryMapper.deleteFiscaleCustomsStatusHistoryByLogIds(logIds);
    }

    /**
     * 删除报关单状态历史信息
     * 
     * @param logId 报关单状态历史主键
     * @return 结果
     */
    @Override
    public int deleteFiscaleCustomsStatusHistoryByLogId(Long logId)
    {
        return fiscaleCustomsStatusHistoryMapper.deleteFiscaleCustomsStatusHistoryByLogId(logId);
    }
    
    /**
     * 根据报关单ID查询状态历史列表
     * 
     * @param declarationId 报关单ID
     * @return 报关单状态历史集合
     */
    @Override
    public List<FiscaleCustomsStatusHistory> selectFiscaleCustomsStatusHistoryListByDeclarationId(Long declarationId)
    {
        return fiscaleCustomsStatusHistoryMapper.selectFiscaleCustomsStatusHistoryListByDeclarationId(declarationId);
    }
}